/* Layout */
const Layout = resolve => require(['@/views/layout/Layout'], resolve);

const OrderRouterMap = {
  id: 39,
  path: '/orders',
  component: Layout,
  redirect: '/orders/achievement',
  name: '订单管理',
  meta: {title: '订单管理', icon: 'orders', power: 'orders'},
  showMode: 'DEFAULT',
  children: [
    {
      id: 83,
      path: 'achievement',
      name: '业绩订单',
      component: resolve => require(['@/views/orders/achievement'], resolve),
      meta: {title: '业绩订单', icon: 'achievement', power: 'orders.achievement'},
      children: [
        {
          path: 'modify',
          name: '修改',
          component: resolve => require(['@/views/orders/achievement/modify'], resolve),
          meta: {title: '修改', power: 'orders.achievement.modify'},
          hidden: true
        }, {
          path: 'info',
          name: '详情',
          component: resolve => require(['@/views/orders/achievement/info'], resolve),
          meta: {title: '详情', power: 'orders.achievement.info'},
          hidden: true
        }, {
          path: 'review',
          name: '审核',
          component: resolve => require(['@/views/orders/achievement/review'], resolve),
          meta: {title: '审核', power: 'orders.achievement.review'},
          hidden: true
        }
      ]
    }, {
      id: 91,
      path: 'afterSale',
      name: '售后订单',
      component: resolve => require(['@/views/orders/afterSale'], resolve),
      meta: {title: '售后订单', icon: 'aftersale', power: 'orders.aftersale'},
      children: [
        {
          path: 'modify',
          name: '详情 / 修改',
          component: resolve => require(['@/views/orders/afterSale/modify'], resolve),
          meta: {title: '详情 / 修改', power: 'orders.aftersale.modify'},
          hidden: true
        }
      ]
    }, {
      id: 40,
      path: 'orders',
      name: '客户订单',
      component: resolve => require(['@/views/orders/orders'], resolve),
      meta: {title: '客户订单', icon: 'orderlist', power: 'orders.order'}
    }, {
      id: 0,
      path: 'expireOrder',
      name: '即将到期订单',
      component: resolve => require(['@/views/orders/expireOrder'], resolve),
      meta: {title: '即将到期订单', icon: 'expire', power: 'orders.expireOrder'}
    }, {
      id: 259,
      path: 'refund',
      name: '订单退款',
      component: resolve => require(['@/views/orders/refund'], resolve),
      meta: {title: '订单退款', icon: 'achievement', power: 'orders.achievement'},
      children: [
        {
          id: 260,
          path: 'create',
          name: '提交',
          component: resolve => require(['@/views/orders/refund/create'], resolve),
          meta: {title: '提交', power: 'orders.achievement.create'},
          hidden: true
        }, {
          path: 'info',
          name: '详情',
          component: resolve => require(['@/views/orders/refund/info'], resolve),
          meta: {title: '详情', power: 'orders.achievement.info'},
          hidden: true
        }, {
          id: 261,
          path: 'review',
          name: '审核',
          component: resolve => require(['@/views/orders/refund/review'], resolve),
          meta: {title: '审核', power: 'orders.achievement.review'},
          hidden: true
        }, {
          id: 262,
          path: 'pay',
          name: '付款',
          component: resolve => require(['@/views/orders/refund/pay'], resolve),
          meta: {title: '付款', power: 'orders.achievement.pay'},
          hidden: true
        }
      ]
    }
  ]
}

export default OrderRouterMap;
